package org.example.lesson02;

import java.io.FileWriter;
import java.io.IOException;

public class les02_Demo_05 {
    public static void main(String[] args) throws IOException {
        //定义一个字符输出流
        FileWriter writer = new FileWriter("d:/javacode/aaa/abc.txt");
        //写入具体字符
        writer.write("Hello,World!!!");
        writer.write("\n");
        writer.write("你好，世界!!!");
        //强制刷新缓冲区
        writer.flush();
        //关闭流
        writer.close();
    }
}
